#include "head.h"


//错误检查函数
void log_init(){
    const char * program = "server";
    openlog(program,LOG_CONS | LOG_PID | LOG_NDELAY | LOG_PERROR,LOG_DEBUG);
}

void error_log(const char * funcname){
    syslog(LOG_DEBUG,"%s(%s)",funcname,strerror(errno));
}
void client_log(const char * clientname,const char * funcname){
    syslog(LOG_INFO,"%s(%ld) : %s",clientname,pthread_self(),funcname);
}
void debug_log(const char * funcname){
    syslog(LOG_DEBUG,"tid(%ld):%s",pthread_self(),funcname);
}


